import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooWechatUserHasTagsController } from '../../../controllers';
const uctoowechatUserHasTagsRouter = new Router();
const wechatUserHasTagsController = new uctooWechatUserHasTagsController();

uctoowechatUserHasTagsRouter.post('/add', requireUser, wechatUserHasTagsController.add);
uctoowechatUserHasTagsRouter.post('/edit', requireUser, rowLevelPermission('uctoo/wechat_user_has_tags'), wechatUserHasTagsController.edit);
uctoowechatUserHasTagsRouter.post('/del', requireUser, rowLevelPermission('uctoo/wechat_user_has_tags'), wechatUserHasTagsController.delete);

//For getting wechatUserHasTags with permission control
uctoowechatUserHasTagsRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/wechat_user_has_tags'), wechatUserHasTagsController.getSingle);
uctoowechatUserHasTagsRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/wechat_user_has_tags'), wechatUserHasTagsController.getMany);
uctoowechatUserHasTagsRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/wechat_user_has_tags'), wechatUserHasTagsController.getMany);

//#endregion AutoCreateCode
export default uctoowechatUserHasTagsRouter;
